import axios from 'axios';
import Global from './global';

axios.interceptors.request.use(function(config){
    config.headers['Authorization'] = 'FirebaseIdToken:'+Global.token
    return config
},function(error){
    return Promise.reject(error);
})

axios.interceptors.response.use(function(response){
    return response.data
},function(error){
    return Promise.reject(error)
})

export default axios;